<template>
    <a
      v-bind:class="[disable?'canclebutton-a-disable':'','canclebutton-a']"
      v-on:click="buttonEvent"
    >{{title}}</a>
</template>
<style scoped>
.canclebutton {
  margin: 5px 5px;
}
.canclebutton-a {
  background-color: #e6e6e6;
  color: #524e4e;
  /* min-width: 50px; */
  height: 28px;
  line-height: 28px;
  /* border: 1px solid #e6e6e6; */
  text-align: center;
  cursor: pointer;
  margin: 5px;
  border-radius: 3px;
  padding: 0px 14px;
}
.canclebutton-a-disable {
  cursor: not-allowed;
  background-color: #e6e6e6;
  /* border: 1px solid #e6e6e6; */
}
</style>
<script>
//表格内操作按钮
export default {
  name: "cancelButton",
  props: {
    disable: {
      default: false
    },
    title: {
      default: ""
    }
  },
  meta: {
    descr: "取消按钮"
  },
  methods: {
    buttonEvent: function() {
      var that = this;
      if (!that.disable) {
        that.$emit("click");
      }
    }
  }
};
</script>

